﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AttackBuffTrigger : MonoBehaviour
{
    public ScriptableBuff buff;
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            other.GetComponent<PlayerComponent>().AcquirBuff(new TimedAttackBuff(buff, other.gameObject));

            Destroy(gameObject);
        }
    }
}
